
<template>
	<div class="products_drive">
		<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
		  <el-form-item label="接口名称" prop="name" style='width:30%;' >
		    <span>{{this.msgDetail.name}}</span>
		  </el-form-item>
		  <el-form-item label="接口版本" prop="version" style='width:30%;' >
		    <span>{{this.msgDetail.version}}</span>
		  </el-form-item>
		  <el-form-item label="接口地址" prop="address" style='width:30%;'>
		    <span>{{this.msgDetail.url}}</span>
		  </el-form-item>
		  <el-form-item label="接口描述" prop="desc" style='width:30%;'>
		    <span>{{this.msgDetail.description}}</span>
		  </el-form-item>
		   <el-form-item>
		    <el-button @click="historyBack">返回</el-button>
		  </el-form-item>
		</el-form>
	</div>
</template>

<script>
import { checkLogin } from '../../api/api.js';
export default {
	name:'InterfaceView',
	data() {
		var Edition = (rule, value, callback) => {
			console.log(value);
			var re =/^[1-9]+\.\d+\.\d+$/im;
			if (re.test(value)){
				callback();
			}else{
				return callback(new Error('版本号不正确'));
			}
		};
		return {
			msgDetail:'',
		};
	},
	methods:{
		historyBack() {
	        window.history.back(-1);
	    }
		
	},
	mounted(){
		if(checkLogin(this)){
			this.msgDetail = JSON.parse(sessionStorage.getItem('row'));
			console.log('详情页参数。。。。。。',this.msgDetail);	
		}
	}
}
</script>
<style scoped>
	.products_drive{width:100%;margin:10px;margin-left:200px;}
	.products_drive .di{
		width:90%;
		margin: 0 auto;
		overflow: hidden;

	}
	.products_drive .di .di_foot{
		float: right;
		width: 38%;
		padding-bottom: 20px;
		padding-top: 20px;
	}
</style>
